package datatypes;

import java.util.Comparator;

public class VertexXCoordinateComparator implements Comparator<Vertex> {

	@Override
	public int compare(Vertex p1, Vertex p2) {
		if (p1.getX() < p2.getX()) return -1;
		if (p1.getX() > p2.getX()) return 1;
		//if x coordinates are equal don't care about the y coordinates and say the two points are equal.
		return 0;
	}

}
